package DatagramSocketDemo;

import java.io.*;
import java.net.*;

public class receiveDemo {

	public static void main(String[] args) throws IOException {

		DatagramSocket ds = new DatagramSocket(10086);

		byte[] b = new byte[1024 * 100];

		while (true) {
			int len = b.length;
			DatagramPacket dp = new DatagramPacket(b, len);

			ds.receive(dp);

			byte bt[] = dp.getData();

			String pf = new String(bt, 0, dp.getLength());
			System.out.println(pf);

		}

	}

}
